import { defHttp } from '/@/utils/http/axios';
import { ApiCommon } from '../common';

const { CUSTOMER_ADMIN_API, BILLING_ADMIN_API, CHARGE_API } = ApiCommon;

enum Api {
  BILL_PAGE = '/integrated-business/bill/page', //综合业务办理账单列表
  INVOICR_LIST = '/invoice/list', //获得发票中的类型
  UNIT_PRICE = '/scheme/get/billing/unit-price',
  RETURN_PAGE = '/admin/refund-detail/page', 
  RETURN_WRITE_OFF = '/admin/refund-detail/write-off',
}

// 获得表单列表的数据
export const getBullPageApi = (data?: any) =>
  defHttp.post({ url: CUSTOMER_ADMIN_API + Api.BILL_PAGE, data });
// 获得开票中发票类型
export const invoiceListApi = () => defHttp.get({ url: BILLING_ADMIN_API + Api.INVOICR_LIST });

// 获得计费单价
export const unitPriceApi = () => defHttp.get({ url: BILLING_ADMIN_API + Api.UNIT_PRICE });

// 获得退费列表的数据
export const getReturnFeePageApi = (data?: any) =>
  defHttp.post({ url: CHARGE_API + Api.RETURN_PAGE, data });

// 退费列表的销账
export const returnFeeWriteOff = (data: any) =>
  defHttp.post({ url: CHARGE_API + Api.RETURN_WRITE_OFF, data });
